import {
  Reservation,
  ReservationStatus,
} from '@app/common/types/graphqls/graphql.schema';
import { Schema } from 'mongoose';

const schema = new Schema<Reservation>({
  guestName: { type: String, required: true },
  contactInfo: { type: String, required: true },
  arrivalTime: { type: Date, required: true },
  status: {
    type: String,
    enum: ReservationStatus,
    default: ReservationStatus.Created,
  },
  reservedSize: { type: Number, required: true },
  reservedBy: { type: String, required: true },
});

export default schema;
